<template>
  <div>
    <header>
      <p>用户名：{{ $store.state.users.uid }}</p>
      <van-button type="default" @click="layout">退出</van-button>
    </header>
    <van-notice-bar
      left-icon="volume-o"
      text="在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {
    layout() {
      this.$store.commit("logout");
      this.$router.push("/login");
    },
  },
  computed: {},
};
</script>

<style scoped>
header {
  width: 100%;
  height: 60px;
  line-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #ddd;
}
</style>
